import axios from '@/api/request/request'

// 获取列表
const getUser = (option: any) => {
  return axios.post('/auth/user/pageUser', {
    ...option
  })
}

// 查找角色
// const findRole = (id: any) => {}

// 添加
const addUser = (option: any) => {
  return axios.post('/auth/user/addUser', {
    ...option
  })
}

// 删除节点
const deleteUser = (option: any) => {
  return axios.post('/auth/user/deleteUser', {
    ...option
  })
}

// 更新节点
const updateUser = (option: any) => {
  return axios.post('/auth/user/updateUser', {
    ...option
  })
}

// 更新角色权限菜单
// const updateRoleMenus = (id: any, menus: any) => {}

// 登录
const login = (option: any) => {
  return axios.post('/auth/userLogin/login', {
    ...option
  })
}

export { getUser, addUser, deleteUser, updateUser, login }
